package com.ebupt.migu.music.global.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.ebupt.migu.globalpopup.entity.ActivityInfo;
import com.ebupt.migu.globalpopup.entity.QueryGlobalActionsRequestBean;
import com.ebupt.migu.globalpopup.entity.QueryGlobalActionsResultBean;
import com.ebupt.migu.music.global.dto.QueryActivitiesResultBean;
import org.apache.ibatis.annotations.Mapper;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author liuyangyang@ebupt.com
 * @Description
 * @Date 2021/11/23 10:07
 */
@Mapper
@DS("mysql_mg")
public interface GlobalActionMapper {

    /**
     * 条件查询
     *
     * @param bean
     * @return
     */
    public List<QueryActivitiesResultBean> query(QueryGlobalActionsRequestBean bean);

    /**
     * 条件查询总量
     *
     * @param bean
     * @return
     */
    public Integer queryTotal(QueryGlobalActionsRequestBean bean);

    /**
     * 通过
     *
     * @return
     */
    public QueryGlobalActionsResultBean queryById(QueryGlobalActionsRequestBean bean);

    /**
     * 提升优先级
     *
     * @param id
     * @return
     */
    public Integer priorityUp(int id);

    /**
     * 降低优先级
     *
     * @param id
     * @return
     */
    public Integer priorityDown(int id);

    /**
     * id最大值
     *
     * @return
     */
    public int maxID();

    /**
     * 更新优先级
     */
    public void updatePriority(HashMap<String, Integer> params);
}
